export const state = () => ({
  userInfo: {
    token: '',
    user: {}
  }
})
export const mutations = {
  setUserInfo(state, data) {
    state.userInfo = data
  },
  /* againLogin(state, data) {
    // console.log(data);
    state.userInfo = data
  } */
};

export const actions = {
  /* getLogin({ commit }, data) {
    this.$axios({
      url: "/accounts/login",
      data,
      method: "post"
    }).then(res => {
      // console.log(res);
      if (res.data.token) {
        this.$router.push("/");
      }
      const data = res.data
      commit('setUserInfo', data)
    }) */


  // }
};
